package com.zws.cucumber.snapshot;

import java.util.Collections;
import java.util.List;


public class ZwsSnapshotFacade {

    private List<ZwsSnapshotManager<?>> snapshotManagers;

    public ZwsSnapshotFacade(List<ZwsSnapshotManager<?>> snapshotManagers) {
        this.snapshotManagers = snapshotManagers;
    }

    public void takeSnapshot(String snapshotName) {
        snapshotManagers.forEach(mgr -> mgr.snapshot(snapshotName, Collections.emptyMap()));
    }

    public void restoreSnapshot(String snapshotName) {
        snapshotManagers.forEach(mgr -> mgr.restore(snapshotName, Collections.emptyMap()));
    }

    public void deleteSnapshot(String snapshotName) {
        snapshotManagers.forEach(mgr -> mgr.delete(snapshotName));
    }

}
